<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>积分明细 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .tab-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
    
    .points-card {
      background: linear-gradient(135deg, #ff7e2d, #ff9d5c);
      border-radius: 12px;
      color: white;
    }
    
    .record-item {
      border-bottom: 1px solid var(--border);
    }
    
    .record-item:last-child {
      border-bottom: none;
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="member_points.html" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">积分明细</h1>
      <div class="w-5"></div>
    </div>
    
    <!-- 积分卡片 -->
    <div class="p-4">
      <div class="points-card p-4">
        <div class="flex items-center justify-between mb-2">
          <h2 class="text-lg font-medium">我的积分</h2>
        </div>
        
        <div class="flex items-baseline">
          <span class="text-3xl font-bold">210</span>
          <span class="text-sm ml-2 opacity-80">本月获得: +35</span>
        </div>
        
        <div class="flex mt-4">
          <a href="member_points_mall.html" class="bg-white bg-opacity-20 rounded-lg px-6 py-2 flex items-center justify-center mr-3">
            <i class="fas fa-gift mr-1"></i>
            <span>积分兑换</span>
          </a>
          <a href="member_points_rules.html" class="bg-white bg-opacity-20 rounded-lg px-6 py-2 flex items-center justify-center">
            <i class="fas fa-info-circle mr-1"></i>
            <span>积分规则</span>
          </a>
        </div>
      </div>
    </div>
    
    <!-- 标签页 -->
    <div class="px-4 border-b border-gray-200">
      <div class="flex">
        <div class="tab-active px-6 py-3 text-center">
          <span>全部</span>
        </div>
        <div class="px-6 py-3 text-center text-gray-500">
          <span>获得</span>
        </div>
        <div class="px-6 py-3 text-center text-gray-500">
          <span>使用</span>
        </div>
      </div>
    </div>
    
    <!-- 积分明细列表 -->
    <div class="px-4 py-4">
      <div id="all-records">
        <!-- 获得积分记录 -->
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">每日签到</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-25 08:15</p>
            </div>
            <span class="text-sm primary-color">+3</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">完成订单</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-23 14:30</p>
            </div>
            <span class="text-sm primary-color">+15</span>
          </div>
        </div>
        
        <!-- 使用积分记录 -->
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">兑换优惠券</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-20 16:45</p>
            </div>
            <span class="text-sm text-gray-500">-50</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">每日签到</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-20 09:05</p>
            </div>
            <span class="text-sm primary-color">+3</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">每日签到</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-19 08:30</p>
            </div>
            <span class="text-sm primary-color">+3</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">评价订单</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-18 15:20</p>
            </div>
            <span class="text-sm primary-color">+5</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">完成订单</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-18 14:00</p>
            </div>
            <span class="text-sm primary-color">+20</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">兑换商品</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-15 11:30</p>
            </div>
            <span class="text-sm text-gray-500">-100</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">邀请好友</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-12 16:40</p>
            </div>
            <span class="text-sm primary-color">+50</span>
          </div>
        </div>
      </div>
      
      <!-- 获得积分记录 -->
      <div id="earned-records" class="hidden">
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">每日签到</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-25 08:15</p>
            </div>
            <span class="text-sm primary-color">+3</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">完成订单</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-23 14:30</p>
            </div>
            <span class="text-sm primary-color">+15</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">每日签到</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-20 09:05</p>
            </div>
            <span class="text-sm primary-color">+3</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">每日签到</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-19 08:30</p>
            </div>
            <span class="text-sm primary-color">+3</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">评价订单</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-18 15:20</p>
            </div>
            <span class="text-sm primary-color">+5</span>
          </div>
        </div>
      </div>
      
      <!-- 使用积分记录 -->
      <div id="used-records" class="hidden">
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">兑换优惠券</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-20 16:45</p>
            </div>
            <span class="text-sm text-gray-500">-50</span>
          </div>
        </div>
        
        <div class="record-item py-3">
          <div class="flex justify-between items-center">
            <div>
              <h3 class="font-medium">兑换商品</h3>
              <p class="text-xs text-gray-500 mt-1">2023-10-15 11:30</p>
            </div>
            <span class="text-sm text-gray-500">-100</span>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 底部提示 -->
    <div class="py-4 text-center text-xs text-gray-500">
      <p>已加载全部记录</p>
    </div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 标签页切换
      const tabs = document.querySelectorAll('.px-4.border-b.border-gray-200 .px-6.py-3');
      const contentDivs = [
        document.getElementById('all-records'),
        document.getElementById('earned-records'),
        document.getElementById('used-records')
      ];
      
      tabs.forEach((tab, index) => {
        tab.addEventListener('click', function() {
          // 移除所有标签的激活状态
          tabs.forEach(t => {
            t.classList.remove('tab-active');
            t.classList.add('text-gray-500');
          });
          
          // 激活当前标签
          this.classList.add('tab-active');
          this.classList.remove('text-gray-500');
          
          // 显示对应内容，隐藏其他内容
          contentDivs.forEach((div, i) => {
            if (i === index) {
              div.classList.remove('hidden');
            } else {
              div.classList.add('hidden');
            }
          });
        });
      });
    });
  </script>
</body>
</html> 